package com.cn;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Auther: Y.m
 * @Date: 2020/6/19 12:04
 * @Description:
 */
public class StartupApplication {
	static ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext-bean.xml");
	/**
	 * 测试占位符
	 * 其中USERNAME是去系统变量里面查找的
	 */
//	static ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring-${USERNAME}.xml");
//	static ClassPathXmlApplicationContext ctx = new MyClassPathXmlApplicationContext("applicationContext-bean.xml");


	public static void main(String[] args) {
		System.out.println(ctx.getBeanDefinitionNames());
		System.out.println(ctx.getBean("person2"));
	}
}
